package io.imp.orm;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

/**
 * @ClassName: Condition
 * @Description: TODO
 * @author CHEN-HF
 * @date 2017年12月14日 上午9:54:16
 * 
 */
public interface Condition {
	public static final String BETWEEN = "BETWEEN";
	// public static final String BETWEEN_AND_EQUALS = "BETWEEN_AND_EQUALS";
	public static final String GREATNESS = "GREATNESS";
	public static final String SMALLNESS = "SMALLNESS";
	public static final String GREATNESS_AND_EQUALS = "GREATNESS_AND_EQUALS";
	public static final String SMALLNESS_AND_EQUALS = "SMALLNESS_AND_EQUALS";
	public static final String LIKE = "LIKE";
	public static final String START = "START";
	public static final String END = "END";
	public static final String EQUALS = "EQUALS";
	public static final String IS_NOT_NULL = "NOT_NULL";
	public static final String IS_NULL = "IS_NULL";
	public static final String OR = "OR";
	public static final String IN = "IN";
	public static final String NOT = "NOT";

	public static final String LEFT = "LEFT";
	public static final String RIGHT = "RIGHT";

	public static final String BETWEEN_SPLIT = "-BTW-";

	public static final String ILIKE = "ILIKE";
	public static final String NOT_IN = "NOT_IN";
	public static final String NOT_EQ = "NOT_EQ";

	public String getProperty();

	public String getOperator();

	public Object getValue();

	public abstract Predicate generateExpression(Root<?> paramRoot, CriteriaBuilder paramCriteriaBuilder);

}
